﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Attributes - Class</title>
    <script src="script/jquery-1.3.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function AddClass() {
            $("div").addClass("box");    
        }

        function RemoveClass() {
            $("div").removeClass("box");
        }

        function ToggleClass() {
            $("div").toggleClass("box");
        }
    </script>
    <style type="text/css">
    .box
    {
        border:dashed 1px #000;
        padding:13px;
        margin-top:13px;
    }
    </style>
</head>
<body>
    <input type="button" value="add class" onclick="AddClass()" />
    <input type="button" value="remove class" onclick="RemoveClass()" />
    <input type="button" value="toggle class" onclick="ToggleClass()" />
    
    <div>
        Hello jQuery
    </div>
</body>
</html>
